package com.situ.day6;

import java.security.AlgorithmParameterGenerator;

public class Student {
	// 实例变量（实例就是new出来对象,必须new出对象，实例变量才能访问）
	private Integer id;
	private String name;
	private Integer age;
	private String className;
	// static静态变量
	public static String country = "CN";
	// private Integer[] arrray = new Integer[10000];

	public Student() {
		super();
	}

	public Student(Integer id, String name, Integer age, String className) {
		super();
		this.id = id;
		this.name = name;
		this.age = age;
		this.className = className;
	}

	// 实例方法，必须new出对象，然后（对象.show()）方式调用
	public void show() {
		age = 20;
		country = "AA";
	}

	public static void print() {
		System.out.println("Student.print()");
		country = "US";
		// Cannot make a static reference to the non-static field age
		// age = 20;//访问实例变量、实例方法前提是必须new出一个实例对象才能访问
		// show();
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}
	
	@Override
	public String toString() {
		return "Student [id=" + id + ", name=" + name + ", age=" + age + ", className=" + className + "]";
	}

}
